package com.itboye.jinpuyiyuan.responsitory;

import com.google.gson.reflect.TypeToken;
import com.itboye.jinpuyiyuan.bean.ALIInfoBean;
import com.itboye.jinpuyiyuan.bean.AppointPhysicalBean;
import com.itboye.jinpuyiyuan.bean.ArticleDetailBean;
import com.itboye.jinpuyiyuan.bean.ArticleListBean;
import com.itboye.jinpuyiyuan.bean.BannerBean;
import com.itboye.jinpuyiyuan.bean.BranchBean;
import com.itboye.jinpuyiyuan.bean.BranchDepartmentBean;
import com.itboye.jinpuyiyuan.bean.BranchDepartmentBeanNew;
import com.itboye.jinpuyiyuan.bean.ConfigBean;
import com.itboye.jinpuyiyuan.bean.DailyInfoBean;
import com.itboye.jinpuyiyuan.bean.DayOrderBean;
import com.itboye.jinpuyiyuan.bean.DoctorRegInfoBean;
import com.itboye.jinpuyiyuan.bean.EmptyBean;
import com.itboye.jinpuyiyuan.bean.HospRecord;
import com.itboye.jinpuyiyuan.bean.HospitalInfoBean;
import com.itboye.jinpuyiyuan.bean.IllTagBean;
import com.itboye.jinpuyiyuan.bean.InHosBean;
import com.itboye.jinpuyiyuan.bean.LaborInfoBean;
import com.itboye.jinpuyiyuan.bean.LaborRecordBean;
import com.itboye.jinpuyiyuan.bean.NoticeBean;
import com.itboye.jinpuyiyuan.bean.OnlineBean;
import com.itboye.jinpuyiyuan.bean.OptionMenuBean;
import com.itboye.jinpuyiyuan.bean.OrderBean;
import com.itboye.jinpuyiyuan.bean.OrderDetailBean;
import com.itboye.jinpuyiyuan.bean.OrderList;
import com.itboye.jinpuyiyuan.bean.PayInfo;
import com.itboye.jinpuyiyuan.bean.PersonBean;
import com.itboye.jinpuyiyuan.bean.PhyAppointBean;
import com.itboye.jinpuyiyuan.bean.PhysicalListBean;
import com.itboye.jinpuyiyuan.bean.QueryDoctorListBean;
import com.itboye.jinpuyiyuan.bean.QueryDoctorListBeanNew;
import com.itboye.jinpuyiyuan.bean.RecipeOrderBean;
import com.itboye.jinpuyiyuan.bean.RecipeRecordBean;
import com.itboye.jinpuyiyuan.bean.RecipeRecordInfo;
import com.itboye.jinpuyiyuan.bean.RegisterDoctorDetail;
import com.itboye.jinpuyiyuan.bean.SelfPhysicalsBean;
import com.itboye.jinpuyiyuan.bean.UserInfoBean;
import com.itboye.jinpuyiyuan.bean.VipBean;
import com.itboye.jinpuyiyuan.bean.WXBean;
import com.itboye.jinpuyiyuan.bean.YJJBean;
import com.itboye.jinpuyiyuan.bean.preRegistrationBean;
import com.itboye.jinpuyiyuan.interfaces.ISelectBranch;
import com.itboye.jinpuyiyuan.utils.volley.BaseErrorListener;
import com.itboye.jinpuyiyuan.utils.volley.BaseNetRepository;
import com.itboye.jinpuyiyuan.utils.volley.BaseSuccessReqListener;
import com.itboye.jinpuyiyuan.utils.volley.ByJsonRequest;
import com.itboye.jinpuyiyuan.utils.volley.ICompleteListener;

import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/12/14 0014.
 */
public class BranchAddressResponsitory extends BaseNetRepository implements ISelectBranch<BranchBean> {

    private String api = "100";//接口版本号
    private String api1="101";
    private String api3="103";

    private String config = "By_Config_app";// 获取配置
    private String loginByWX="By_Weixin_loginApp";//微信登录
    private String addRemark="By_UserTags_add";//添加标签
    private String editRemark="By_UserTags_edit";//修改标签
    private String removeRemark="By_UserTags_delete";//删除标签
    private String queryRemark="By_UserTags_query";//查询标签
    private String queryOnline="By_UserProfile_getOnlineStatus";//查询用户在线状态
    private String synInfo="By_Alibaichuan_sync";//同步用户信息
    private String aliInfo="By_Alibaichuan_info";//查询用户信息
    private String vip="By_UserGrade_info";//会员等级
    private String banner="By_Banners_query";//轮播
    private String getVerifyCode="By_SecurityCode_create";//获取验证码

    private String sendVerifyCode="By_SecurityCode_send";//发送验证码
    private String verifyCode="By_SecurityCode_verify";//校验验证码
    private String verificationVerifyCode="By_SecurityCode_check";//验证验证码
    private String updatePass="By_UserAccount_updatePwdByOldPwd";//修改密码（无验证码）
    private String updatePassword="By_UserAccount_updatePwdByMobileCode";//修改密码（有验证码）
    private String register="By_UserAccount_register";//注册
    private String loginBySign="By_UserAccount_loginByUsername";//登录（用户名+密码）
    private String outLogin="By_UserAccount_logout";//退出登录
    private String login="By_UserAccount_loginByMobile";//登录(国家区号+手机号+密码+验证码)
    private String suggest="By_Suggest_add";//意见反馈

    private String articleDetail="By_Post_info";//文章详情
    private String queryArticle="By_Post_queryByCateOrTag";//文章查询

    private String queryMessage="By_Message_query";//消息查询

    private String addPrivateMessage="By_Message_add";//私聊消息添加

    private String postLike="By_Post_like";//点赞


    private String getUserInfo="By_UserIdCard_info";//获取用户信息
    private String updateUserInfo="By_UserIdCard_update";//用户身份信息更新
    private String updateLocation="By_UserProfile_updateGeoHash";//用户GPS位置更新
    private String updateUserPrefile="By_UserProfile_update";//用户更新

    private String branch = "By_Hosp_query";// 分院查询
    private String department = "By_HospSect_query";// 分院科室查询
    private String queryDoctor="By_HospDoct_query";//医师查询
    private String queryDoctorDetail="By_HospDoct_detail";//医师详情

    private String doctorRegInfo = "By_HospDoct_regInfo";//排班查询

    private String preRegister="By_Order_orderReg";//预挂号

    private String aliPay= "By_Order_alipay"; //ali pay

    private String payInfo ="By_Order_prePay"; //订单信息

    private String orderList="By_Order_orderList";//订单列表

    private String orderDetail="By_Order_orderDetail";//订单详情

    private String userIdCard="By_UserIdCard_verify";//实名认证

    private String MessageAdd="By_Message_add";//消息添加（私聊消息）

    private String cancleOrderRefund="By_Order_refund"; //取消挂号并退款

    private String rebackMoney="By_Order_OrderRefund"; //退款

    private String hospitalInfo="By_Hospitalization_advanceGold"; //住院信息

    private String dailyList="By_Hospitalization_dailyList"; //日清单

    private String dailyInfo="By_Hospitalization_dailyDetail"; //日清单详情

    private String hospitalTest="By_Hospitalization_staticMenu"; //获取体检套餐列表跟套餐详情

    private String getSelfList="By_Hospitalization_deptList"; //获取自选套餐科室

    private String getPhysicals="By_Hospitalization_optionalMenu";//获取体检科室与项目关系

    private String physicalAppoint="By_Hospitalization_appointment";//体检预约预确认

    private String recipeRecord="By_Hospitalization_prescriptionRecord";//处方记录

    private String recipeRecordDetail="By_Hospitalization_prescriptionDetail";//处方记录详情

    private String recipeOrder="By_Hospitalization_prescriptionOrder";//生成处方记录

    private String getPhyAppoint="By_Hospitalization_getCheckList";//获取体检预约记录列表

    private String hosRecord="By_Hospitalization_visitingRecord"; //就诊记录

    private String getLaborRecord="By_Hospitalization_laboratoryRecord";//获取化验记录

    private String getLaborInfo="By_Hospitalization_laboratoryDetail";//获取化验记录

    private String getPhyReporter="By_Hospitalization_getReport";//获取体检预约记录列表


//    private

    private String inHostRecord="By_Hospitalization_inHospital";//住院记录

    private String yjjPay="By_Hospitalization_inHosPrePay";//预交金预支付

    private String yjjRecord="By_Hospitalization_prepayList";//预交金记录

    public BranchAddressResponsitory(ICompleteListener iCompleteListener) {
        super(iCompleteListener);
    }

    @Override
    public void deleteCacheConfig(String nope) {

    }

    @Override
    public void getConfig() {
        Type type = new TypeToken<ConfigBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("app_type","android");
        (new ByJsonRequest.Builder<ConfigBean>())
                .setTypeVerParamsAndReturnClass(config, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<ConfigBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void queryBranch(String longitude, String latitude) {
        Type type = new TypeToken<BranchBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("long",longitude);
        map.put("lati",latitude);
        (new ByJsonRequest.Builder<BranchBean>())
                .setTypeVerParamsAndReturnClass(branch, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<BranchBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void queryDepartment(String hid,String parent_id) {
        Type type = new TypeToken<List<BranchDepartmentBeanNew>>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("hid",hid);
        map.put("parent_id",parent_id);
        (new ByJsonRequest.Builder<List<BranchDepartmentBeanNew>>())
                .setTypeVerParamsAndReturnClass(department, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<BranchDepartmentBeanNew>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();

    }

    @Override
    public void getVerifyCode(String accepter, int code_type, int code_length, int code_create_way, int expire_time) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("accepter",accepter);
        map.put("code_type",code_type);
        map.put("code_length",code_length);
        map.put("code_create_way",code_create_way);
        map.put("expire_time",expire_time);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(getVerifyCode, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void sendVerifyCode(String mobile, String code_type, String send_type) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("country","+86");
        map.put("mobile",mobile);
        map.put("code_type",code_type);
        map.put("send_type",send_type);
        map.put("expire_time","120");
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(sendVerifyCode, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void verifyCode(String mobile, String code, String code_type) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("country","+86");

        map.put("mobile",mobile);
        map.put("code",code);
        map.put("code_type",code_type);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(verifyCode, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void verificationVerifyCode(String accepter, String code, int code_type) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("accepter",accepter);
        map.put("code",code);
        map.put("code_type",code_type);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(verificationVerifyCode, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }


    @Override
    public void updatePass(String uid, String password, String new_password) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("uid",uid);
        map.put("password",password);
        map.put("new_password",new_password);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(updatePass, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void register(String username, String mobile, String code, String password) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("username",username);
        map.put("country_no","+86");
        map.put("mobile",mobile);
        map.put("code","itboye");
        map.put("password",password);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(register, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }


    @Override
    public void login(String nickname,String head,String wx_open_id,String wx_union_id,String mobile, String code, String password, String role) {
        Type type = new TypeToken<PersonBean>() {
        }.getType();
        String apiVer = api3;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("nickname",nickname);
        map.put("head",head);
        map.put("wx_open_id",wx_open_id);
        map.put("wx_union_id",wx_union_id);
        map.put("country_no","+86");
        map.put("mobile",mobile);
        map.put("code",code);
        map.put("password",password);
        map.put("role",role);
        map.put("device_token","device_token");
        map.put("device_type","android");

        (new ByJsonRequest.Builder<PersonBean>())
                .setTypeVerParamsAndReturnClass(login, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<PersonBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void outLogin(String uid, String session_id) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("uid",uid);
        map.put("session_id",session_id);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(outLogin, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void deleteUser(String uid) {

    }

    @Override
    public void forgetPassword(String mobile, String code, String new_password) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("country_no","+86");
        map.put("mobile",mobile);
//        map.put("code",code);
        map.put("code","itboye");
        map.put("new_password",new_password);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(updatePassword, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void resetPassword(String uid, String password, String new_password) {

        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("uid",uid);
        map.put("password",password);
//        map.put("code",code);
        map.put("new_password",new_password);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(updatePass, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }


    @Override
    public void suggestContent(String uid, String name, String suggest_content
            , String tel, String email, String img_ids, String extra) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("uid",uid);
        map.put("name",name);
        map.put("suggest_content",suggest_content);
        map.put("tel",tel);
        map.put("email","email");
        map.put("img_ids","img_ids");
        map.put("extra","extra");

        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(suggest, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();

    }

    @Override
    public void getPersonInfo(String uid) {
        Type type = new TypeToken<UserInfoBean>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("uid",uid);

        (new ByJsonRequest.Builder<UserInfoBean>())
                .setTypeVerParamsAndReturnClass(getUserInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<UserInfoBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void updatePersonInfo(String uid, String card_no, String real_name) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("uid",uid);
        map.put("card_no",card_no);
        map.put("real_name",real_name);

        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(updateUserInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();

    }

    @Override
    public void updateLocation(String uid, String lat, String lng, String coordinate_type) {

        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("dt_type", dt_type);
        map.put("uid",uid);
        map.put("lat",lat);
        map.put("lng",lng);
        map.put("coordinate_type","bd09");
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(updateLocation, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void updateUserProfile(String uid, String nickname, String sign, int sex, String realname,
                                  String idnumber, int online_status) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
//        map.put("uid",uid);
//        map.put("nickname",nickname);
//        map.put("sign",sign);
//        map.put("sex",sex);
//        map.put("realname",realname);
//        map.put("idnumber",idnumber);
//        map.put("login_device_cnt",login_device_cnt);
//        map.put("birthday",birthday);
//        map.put("hometown",hometown);
//        map.put("nation",nation);
//        map.put("profession",profession);
//        map.put("works_cate",works_cate);
//        map.put("working_years",working_years);
//        map.put("online_status",online_status);

        map.put("uid",uid);
        map.put("nickname",nickname);
        map.put("sign",sign);
        map.put("sex",sex);
        map.put("realname",realname);
        map.put("idnumber",idnumber);
        map.put("login_device_cnt",3);
        map.put("birthday",0);
        map.put("hometown","");
        map.put("nation","");
        map.put("profession","");
        map.put("works_cate","");
        map.put("working_years",10);
        map.put("online_status",online_status);

        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(updateUserPrefile, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void queryDoctor( String hid, String cid,String dept_id,String page_index,String page_size,String kword) {
        Type type = new TypeToken<QueryDoctorListBeanNew>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
//        map.put("uid",uid);
        map.put("hid",hid);
        map.put("cid",cid);
        map.put("dept_id",dept_id);
        map.put("page_index",page_index+"");
        map.put("page_size",page_size+"");
        map.put("kword",kword);
        (new ByJsonRequest.Builder<QueryDoctorListBeanNew>())
                .setTypeVerParamsAndReturnClass(queryDoctor, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<QueryDoctorListBeanNew>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void queryDoctorDetail(String uid) {
        Type type = new TypeToken<RegisterDoctorDetail>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        (new ByJsonRequest.Builder<RegisterDoctorDetail>())
                .setTypeVerParamsAndReturnClass(queryDoctorDetail, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<RegisterDoctorDetail>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void postLike(String id, String uid, int cancel) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("uid",uid);
        map.put("cancel",cancel);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(postLike, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void articleDetail(String id,String uid) {

        Type type = new TypeToken<ArticleDetailBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("uid",uid);
        (new ByJsonRequest.Builder<List<NoticeBean>>())
                .setTypeVerParamsAndReturnClass(articleDetail, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<NoticeBean>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void addArticle(String category, String author, String author_name, String cover, String title, String excerpt, String content, String tags, String post_status, String parent_id, String jump_url, int views, String article_from, int likes) {

    }

    @Override
    public void updateArticle(String category, String author, String author_name, String cover, String title, String excerpt, String content, String tags, String post_status, String parent_id, String jump_url, int views, String article_from, int likes) {

    }

    @Override
    public void queryArticle(String category, String tags, String post_status,int page_index,int page_size) {

        Type type = new TypeToken<List<ArticleListBean>>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
        map.put("category",category);
        map.put("tags",tags);
        map.put("post_status",post_status);
        map.put("page_index",page_index);
        map.put("page_size",page_size);

        (new ByJsonRequest.Builder<List<NoticeBean>>())
                .setTypeVerParamsAndReturnClass(queryArticle, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<NoticeBean>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void deleteArticle(String id) {

    }

    @Override
    public void addMessage(String dtree_type, String title, String content, String summary, int send_time, String from_uid, String to_uid, String extra) {

    }

    @Override
    public void queryMessage(String uid, String msg_type, int page_index, int page_size) {
        Type type = new TypeToken<List<NoticeBean>>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("msg_type",msg_type);
        map.put("page_index",page_index);
        map.put("page_size",page_size);
        (new ByJsonRequest.Builder<List<NoticeBean>>())
                .setTypeVerParamsAndReturnClass(queryMessage, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<NoticeBean>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void addPrivateMessage(String dtree_type, String content, String send_time, String from_uid, String to_uid) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("dtree_type",dtree_type);
        map.put("content",content);
//        map.put("send_time",send_time);
        map.put("from_uid",from_uid);
        map.put("to_uid",to_uid);

        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(addPrivateMessage, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }


    @Override
    public void queryBanner(String position) {
        Type type = new TypeToken<List<BannerBean>>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("position",position);
        map.put("---- ","");
        (new ByJsonRequest.Builder<List<BannerBean>>())
                .setTypeVerParamsAndReturnClass(banner, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<BannerBean>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void memberGrade(String uid) {
        Type type = new TypeToken<List<VipBean>>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        (new ByJsonRequest.Builder<List<VipBean>>())
                .setTypeVerParamsAndReturnClass(vip, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<VipBean>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void queryRegion(String uid) {

    }

    @Override
    public void queryPersonInfo(String openId) {

        Type type = new TypeToken<ALIInfoBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("open_id",openId);
        (new ByJsonRequest.Builder<ALIInfoBean>())
                .setTypeVerParamsAndReturnClass(aliInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<ALIInfoBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void synPersonInfo(String uid) {

        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(synInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void addRemark(String uid,String tag_name,String who_tag_uid ) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("tag_name",tag_name);
        map.put("who_tag_uid",who_tag_uid);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(addRemark, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();

    }

    @Override
    public void updateRemark(String id, String uid, String tag_name) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("uid",uid);
        map.put("tag_name",tag_name);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(editRemark, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void removeRemark(int id) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("id",id);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(removeRemark, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void queryRemark(int uid) {
        Type type = new TypeToken<List<IllTagBean>>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        (new ByJsonRequest.Builder<List<IllTagBean>>())
                .setTypeVerParamsAndReturnClass(queryRemark, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<IllTagBean>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void queryOnlineStatus(String bc_open_id) {
        Type type = new TypeToken<OnlineBean>() {
        }.getType();
        String apiVer = api1;
        Map<String, Object> map = new HashMap<>();
        map.put("bc_open_id",bc_open_id);
        (new ByJsonRequest.Builder<OnlineBean>())
                .setTypeVerParamsAndReturnClass(queryOnline, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<OnlineBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void loginByWX(String role, String device_token, String auth_code) {

        Type type = new TypeToken<PersonBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("role",role);
        map.put("device_token",device_token);
        map.put("device_type","android");
        map.put("auth_code",auth_code);
        (new ByJsonRequest.Builder<PersonBean>())
                .setTypeVerParamsAndReturnClass(loginByWX, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<PersonBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void doctorRegInfo(String dept_id, String doctor_id, String start, String end) {

        Type type = new TypeToken<List<DoctorRegInfoBean>>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("dept_id",dept_id);
        map.put("doctor_id",doctor_id);
        map.put("start",start);
        map.put("end",end);
        (new ByJsonRequest.Builder<List<DoctorRegInfoBean>>())
                .setTypeVerParamsAndReturnClass(doctorRegInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<List<DoctorRegInfoBean>>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void preRegistration(String uid, String reg_id, String reg_level,
                                String dept_id, String doctor_id, String reg_date,
                                String time_flag, String reg_fee, String treat_fee) {

        Type type = new TypeToken<preRegistrationBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("reg_id",reg_id);
        map.put("reg_level",reg_level);
        map.put("dept_id",dept_id);

        map.put("doctor_id",doctor_id);
        map.put("reg_date",reg_date);
        map.put("time_flag",time_flag);
        map.put("reg_fee",reg_fee);
        map.put("treat_fee",treat_fee);
        (new ByJsonRequest.Builder<preRegistrationBean>())
                .setTypeVerParamsAndReturnClass(preRegister, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<preRegistrationBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void cancelOrderReg(String uid, String order_id, String cancel_remark) {

    }


    @Override
    public void getPayInfo(String uid, String order_id, String channel, String note) {

        Type type = new TypeToken<PayInfo>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("note",note);
        map.put("order_id",order_id);
        map.put("channel",channel);

        (new ByJsonRequest.Builder<PayInfo>())
                .setTypeVerParamsAndReturnClass(payInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<PayInfo>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();

    }

    @Override
    public void cancelOrderRefund(String uid, String order_id, String refund_remark, String refund_fee) {

        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("order_id",order_id);
        map.put("refund_remark",refund_remark);
        map.put("refund_fee",refund_fee);

        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(cancleOrderRefund, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void rebackMoney(String uid, String order_id) {

        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("order_id",order_id);


        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(rebackMoney, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getOrderList(String uid, String order_type,String pay_status, String page, String size) {

        Type type = new TypeToken<OrderList>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("order_type",order_type);
        map.put("pay_status",pay_status);
        map.put("page",page);
        map.put("size",size);

        (new ByJsonRequest.Builder<OrderList>())
                .setTypeVerParamsAndReturnClass(orderList, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<OrderList>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();

    }

    @Override
    public void getOrderDetail(String uid, String order_id) {
        Type type = new TypeToken<OrderDetailBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("order_id",order_id);

        (new ByJsonRequest.Builder<OrderDetailBean>())
                .setTypeVerParamsAndReturnClass(orderDetail, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<OrderDetailBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void verifyUserIdCard(String uid, String card_no, String birthday, String real_name,
                                 String sex, String mobile, String verify_code, int front_img,
                                 int back_img) {
        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("card_no",card_no);
        map.put("birthday",birthday);
        map.put("real_name",real_name);

        map.put("sex",sex);
        map.put("mobile",mobile);
        map.put("verify_code",verify_code);
        map.put("front_img",front_img);
        map.put("back_img",back_img);
        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(userIdCard, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();

    }

    @Override
    public void HospitalInfo(String uid) {

        Type type = new TypeToken<HospitalInfoBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);

        (new ByJsonRequest.Builder<HospitalInfoBean>())
                .setTypeVerParamsAndReturnClass(hospitalInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<HospitalInfoBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void dailyList(String uid) {

        Type type = new TypeToken<DayOrderBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);

        (new ByJsonRequest.Builder<DayOrderBean>())
                .setTypeVerParamsAndReturnClass(dailyList, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<DayOrderBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void dailyInfo(String uid, String date) {

        Type type = new TypeToken<DailyInfoBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("date",date);

        (new ByJsonRequest.Builder<DailyInfoBean>())
                .setTypeVerParamsAndReturnClass(dailyInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<DailyInfoBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void physicalList(String uid, String packageID, int page, int pageSize) {

        Type type = new TypeToken<PhysicalListBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("packageID",packageID);
        map.put("page",page);
        map.put("pageSize",pageSize);

        (new ByJsonRequest.Builder<PhysicalListBean>())
                .setTypeVerParamsAndReturnClass(hospitalTest, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<PhysicalListBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getSelfList(String uid) {

        Type type = new TypeToken<SelfPhysicalsBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);

        (new ByJsonRequest.Builder<SelfPhysicalsBean>())
                .setTypeVerParamsAndReturnClass(getSelfList, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<SelfPhysicalsBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getPhysicals(String uid, String deptId) {

        Type type = new TypeToken<OptionMenuBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("deptId",deptId);


        (new ByJsonRequest.Builder<OptionMenuBean>())
                .setTypeVerParamsAndReturnClass(getPhysicals, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<OptionMenuBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void physicalOrder(String uid, String isMenu, String menuId, String itemData, String fee, String checkDate) {

        Type type = new TypeToken<AppointPhysicalBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("isMenu",isMenu);
        map.put("menuId",menuId);
        map.put("itemData",itemData);
        map.put("fee",fee);
        map.put("checkDate",checkDate);

        (new ByJsonRequest.Builder<AppointPhysicalBean>())
                .setTypeVerParamsAndReturnClass(physicalAppoint, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<AppointPhysicalBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void recipeRecord(String uid, String query_type) {

        Type type = new TypeToken<RecipeRecordBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("query_type",query_type);

        (new ByJsonRequest.Builder<RecipeRecordBean>())
                .setTypeVerParamsAndReturnClass(recipeRecord, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<RecipeRecordBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void recipeRecordInfo(String uid, String hosp_sequence) {

        Type type = new TypeToken<RecipeRecordInfo>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("hosp_sequence",hosp_sequence);

        (new ByJsonRequest.Builder<RecipeRecordInfo>())
                .setTypeVerParamsAndReturnClass(recipeRecordDetail, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<RecipeRecordInfo>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void recipeOrder(String uid, String hosp_sequence) {

        Type type = new TypeToken<RecipeOrderBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("hosp_sequence",hosp_sequence);

        (new ByJsonRequest.Builder<RecipeOrderBean>())
                .setTypeVerParamsAndReturnClass(recipeOrder, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<RecipeOrderBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getPhyAppoint(String uid) {

        Type type = new TypeToken<PhyAppointBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);

        (new ByJsonRequest.Builder<PhyAppointBean>())
                .setTypeVerParamsAndReturnClass(getPhyAppoint, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<PhyAppointBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getReporter(String uid, String checkUpId) {

        Type type = new TypeToken<String>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("checkUpId",checkUpId);

        (new ByJsonRequest.Builder<String>())
                .setTypeVerParamsAndReturnClass(getPhyReporter, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<String>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getHospRecord(String uid) {

        Type type = new TypeToken<HospRecord>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);

        (new ByJsonRequest.Builder<HospRecord>())
                .setTypeVerParamsAndReturnClass(hosRecord, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<HospRecord>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getLaborRecord(String uid) {

        Type type = new TypeToken<LaborRecordBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);

        (new ByJsonRequest.Builder<LaborRecordBean>())
                .setTypeVerParamsAndReturnClass(getLaborRecord, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<LaborRecordBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getLaborInfo(String uid, String report_type, String report_id) {

        Type type = new TypeToken<LaborInfoBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("report_type",report_type);
        map.put("report_id",report_id);

        (new ByJsonRequest.Builder<LaborInfoBean>())
                .setTypeVerParamsAndReturnClass(getLaborInfo, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<LaborInfoBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getInHosRecord(String uid) {

        Type type = new TypeToken<InHosBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);

        (new ByJsonRequest.Builder<InHosBean>())
                .setTypeVerParamsAndReturnClass(inHostRecord, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<InHosBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getYJJPay(String uid, String fee) {
        Type type = new TypeToken<YJJBean>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("fee",fee);

        (new ByJsonRequest.Builder<YJJBean>())
                .setTypeVerParamsAndReturnClass(yjjPay, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<YJJBean>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }

    @Override
    public void getYjjRecord(String uid, String patientId, String inDate) {

        Type type = new TypeToken<OrderList>() {
        }.getType();
        String apiVer = api;
        Map<String, Object> map = new HashMap<>();
        map.put("uid",uid);
        map.put("patientId",patientId);
        map.put("inDate",inDate);

        (new ByJsonRequest.Builder<OrderList>())
                .setTypeVerParamsAndReturnClass(yjjRecord, apiVer, map, type)
                .requestListener(
                        new BaseSuccessReqListener<OrderList>(
                                getListener()))
                .errorListener(new BaseErrorListener(getListener()))
                .desEncodeThenBuildAndSend();
    }


}
